wget http://apache.stu.edu.tw/spark/spark-2.4.7/spark-2.4.7-bin-hadoop2.7.tgz
tar -xvf spark-2.4.7-bin-hadoop2.7.tgz
mv spark-2.4.7-bin-hadoop2.7 spark
ref:http://spark.apache.org/downloads.html
vim ~/.bashrc
export SPARK_HOME=/home/ubuntu/spark
export PATH=$PATH:$SPARK_HOME/bin
source ~/.bashrc
sudo apt install openjdk-8-jdk openjdk-8-jre
java -version
vim ~/.bashrc
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export JRE_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre
source ~/.bashrc
sudo apt-get install python3
sudo apt-get install python3-pip
pip3 install pyspark
vim ~/.bashrc
export PYTHONPATH=$SPARK_HOME/python:$SPARK_HOME/python/lib/py4j-0.10.7-src.zip:$PYTHONPATH
export PYSPARK_PYTHON=python3
source ~/.bashrc